<?php
class MatchModel{
    
    public function Match(){
        $a=MysqlDb::getInstance();

        $sql='select m.id,t1.team as tn1,m.teamone,m.score,t2.team as tn2,m.teamtwo from `matchs` as m
                LEFT JOIN team as t1 ON m.teamone=t1.id
                LEFT JOIN team as t2 ON m.teamtwo=t2.id';
        return $a->query($sql);
    }
}
?>
















